<?php
/**
 * Conversations - A lightweight BB for Xaraya
 *
 * @package modules
 * @copyright (C) 2003-2006 The Digital Development Foundation.
 * @license GPL {@link http://www.gnu.org/licenses/gpl.html}
 * @link http://www.xaraya.com
 *
 * @subpackage conversations
 * @link http://xaraya.com/index.php/release/760.html
 * @author John Cox
*/
/** 
 * Add a quote
 * 
 * @package Xaraya eXtensible Management System
 * @copyright (C) 2005 by the Xaraya Development Team.
 * @license GPL {@link http://www.gnu.org/licenses/gpl.html}
 * @link http://www.xaraya.org
 *
*/

/**
 * @author John Cox
 * @author jojodee
 * add new forum topic
 */

function conversations_user_qform()
{

    if (!xarVarFetch('postid', 'int:0:', $postid, '', XARVAR_DONT_SET)) return;
    if (!xarVarFetch('tag', 'str:0:', $tag, '', XARVAR_DONT_SET)) return;
    if (!xarVarFetch('tagid', 'int:0:', $tagid, '', XARVAR_DONT_SET)) return;
    if (!xarVarFetch('name', 'str:0:', $name, '', XARVAR_DONT_SET)) return;
    
    $postinfo = xarModAPIFunc('conversations', 'user', 'getposts', array(
                                                          'postid'  => $postid));
    
    foreach ($postinfo as $goofy){
        $text = $goofy['text'];
    }
        
    $data = xarTplModule('conversations', 'user', 'q_form', 
                   array('postid' => $postid,
                         'text'   => $text,
                         'tagset'  => $tag,
                         'tagidset'=> $tagid,
                         'name'    => $name));                                                  


    return $data;
      
}

?>